{% extends 'learn_app/base.html' %}
{% block header %}
主题修改
{% endblock %}

{% block content %}
<div class="container mt-4">
<form method="post" enctype="multipart/form-data">
    {% csrf_token %}
    <div class="form-group">
         {{ form.text}} 
        <!-- 显示表单级错误 -->
        {% if form.non_field_errors %}
          <div class="text-danger mt-2">{{ form.non_field_errors }}</div>
        {% endif %}
    </div>
    <div class="mt-3">
        <button type="submit" class="btn btn-success">保存主题修改</button>
        <a href="{% url 'learn_app:topics' %}" class="btn btn-secondary ms-2">取消修改</a>
    </div>
</form>
</div>
{% endblock %}